<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('mp/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?idmp='.$form->getObject()->getIdmp() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
  <?php if (!$form->getObject()->isNew()): ?>
  <input type="hidden" name="sf_method" value="put" />
  <?php endif; ?>
  <ul>
    <?php foreach ($form as $row): ?>
    <?php if(!$row->isHidden()):?>
    <li class="form_label"> <?php echo $row->renderLabel() ?> </li>
    <li class="form_help"> <?php echo $row->renderHelp() ?> </li>
    <li class="form_error"> <?php echo $row->renderError() ?> </li>
    <li class="form_row"> <?php echo $row->render() ?> </li>
    <?php endif;?>
    <?php endforeach; ?>
    <?php echo $form->renderHiddenFields() ?>
    <li class="form_button">
      <input type="submit" value="Envoyer le message" />
    </li>
  </ul>
</form>
